Skip to content

Rollup of 6 pull requests - #165829

Closed
JonathanBrouwer wants to merge 16 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-StuGK1J
Closed

JonathanBrouwer wants to merge 16 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-StuGK1J

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

fmease and others added 16 commits October 30, 2026 11:27
This pulls some less-trivial changes out of the main migration to `Value<'ll>`.
derived impls kept the lifetime spans of the derive input so the external macro check missed them and `#[expect(redundant_lifetimes)]` on a derived struct went unfulfilled. the lint now skips items whose own span is in an external macro.
Just because the parser of a specific syntax fragment kind returns an
`Err(_)` doesn't automatically mean that the problematic token sequence
isn't "of" that fragment's kind. The token sequence might "almost" be of
that kind (i.e., share a non-empty prefix) but simply contain a syntax
error in it.

On a side note, it's rather odd that the now removed
`annotate_err_with_kind` only added the note "this macro call doesn't
expand to a $fragkind" if the target fragment kind was *type* or *pat*,
there are 20 kinds at the of writing.
…..)`

This also means that it's now available under `core::pat` instead of
`core` directly. This makes it consistent with the `std` re-export
which is only available under `std::pat` and not under `std` directly.

Moreover, drop library feature `pattern_type_macro` and demote language
feature `pattern_types` to a library feature. This is nice because it
means `std::pat::pattern_type` is no longer unnecessarily gated behind
two (!) feature gates.
This also means that it's now available under `core::view` instead of
`core` directly. This makes it consistent with the `std` re-export
which is only available under `std::view` and not under `std` directly.

Moreover, drop library feature `view_type_macro` and demote language
feature `view_types` to a library feature. This is nice because it
means `std::view::view_type` is no longer unnecessarily gated behind
two (!) feature gates.
cg_llvm: Use an invariant lifetime brand for LLVM values

This PR changes the type of LLVM value references from `&'ll Value` to `Value<'ll>` with an invariant lifetime brand, to help uphold soundness of the FFI bindings.

There should be no change to compiler output.

---

Value is one of the more widely-used types, much more so than Type, so unfortunately this step ends up needing to touch quite a lot of code. Thankfully almost all of the changes are trivial.
Implement `core::ops::FnAddr`

This implements `FnAddr` as proposed in rust-lang/libs-team#837 (comment).

This is my first contribution to the rust compiler, so I'm not 100% familiar with the process.

All code was hand written by me.

cc rust-lang#148768
…syntax, r=mati865

Migrate built-in macros `pattern_type` & `view_type` to macros 2.0 that expand to internal syntax

Part of MCP-approved rust-lang#110680.

Best reviewed commit by commit. Please see individual commit messages for further details.

Pinging owner of pattern types @oli-obk & owner of view types @scrabsha for visibility.

<sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
…ternal-macro, r=petrochenkov

do not lint `redundant_lifetimes` on items from external macros

derived impls copy the lifetime spans from the derive input so the external macro check on the lint span never fires and the lint is reported on the generated impl. that also left `#[expect(redundant_lifetimes)]` on a derived struct unfulfillable. now the lint skips items whose own span is in an external macro.

fixes rust-lang#150553
as suggested in rust-lang#150553 (comment)

r? @petrochenkov
Extend support of lint `explicit_outlives_requirements` to checked type aliases

Best reviewed by ignoring whitespace changes.

Part of rust-lang#112792.

<sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
…=aerooneqq

Add regression test for HRTB projection bound with TryFrom error

Fixes rust-lang#81162

This was fixed by rust-lang#85499.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Nov 11, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-raw-pointers Area: raw pointers, MaybeUninit, NonNull A-run-make Area: port run-make Makefiles to rmake.rs A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-minicore` F-autodiff `#![feature(autodiff)]` PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Nov 11, 2026
@rustbot rustbot added the WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) label Nov 11, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,test-x86_64-gnu-aux,test-x86_64-msvc-1,test-aarch64-apple-1,test-aarch64-apple-2,test-x86_64-mingw-1,test-i686-msvc,test-armhf-gnu,test-x86_64-gnu-llvm-22-3,test-aarch64-msvc-2

@rust-bors

rust-bors Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

📌 Commit c3029de has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 11, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 11, 2026
Rollup of 6 pull requests


try-job: dist-various-1
try-job: test-various
try-job: test-x86_64-gnu-aux
try-job: test-x86_64-msvc-1
try-job: test-aarch64-apple-1
try-job: test-aarch64-apple-2
try-job: test-x86_64-mingw-1
try-job: test-i686-msvc
try-job: test-armhf-gnu
try-job: test-x86_64-gnu-llvm-22-3
try-job: test-aarch64-msvc-2
@rust-bors

This comment has been minimized.

@rust-bors

rust-bors Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 3de8c1c (3de8c1c65560fecc3918a9bbc66421c52d43d15b)
Base parent: 3ef0c22 (3ef0c22cdb86ac42dc6b8f0f1ec36857daa6f2a1)

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Nov 12, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #165804 (cg_llvm: Use an invariant lifetime brand for LLVM values)
 - #165412 (Implement `core::ops::FnAddr`)
 - #165487 (Migrate built-in macros `pattern_type` & `view_type` to macros 2.0 that expand to internal syntax)
 - #165818 (do not lint `redundant_lifetimes` on items from external macros)
 - #164795 (Extend support of lint `explicit_outlives_requirements` to checked type aliases)
 - #165824 (Add regression test for HRTB projection bound with TryFrom error)
@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 12, 2026
@rust-bors

rust-bors Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 9190e47 failed: CI. Failed job:

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-x86_64-mingw-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 12, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 12, 2026
@rust-bors

rust-bors Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved due to being closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-raw-pointers Area: raw pointers, MaybeUninit, NonNull A-run-make Area: port run-make Makefiles to rmake.rs A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-minicore` F-autodiff `#![feature(autodiff)]` PG-exploit-mitigations Project group: Exploit mitigations rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants